<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Nav extends BaseModel {

	protected $table = 'nav';

	public $timestamps = false;

	protected $fillable = [
		'title',
		'sort_id',
		'is_show',
		'url'
	];


	public function scopeStatus($query){

		return $query->where('is_show',self::NORMAL_STATUS);

	}

	public function get_nav_list(){
		return $this
				->status()
				->paginate(self::PAGESIZE);
	}

}
